
package containers;

/**
 * Container to hold the TestsTaken
 * @author Chris
 */
public class TestsTaken {
    public String teacher;
    public String group;
    public String test;
    public int score;
    
    public TestsTaken() { }
    public TestsTaken(String _teacher, String _group, String _test, String _score) {
        teacher = _teacher;
        group = _group;
        score = Integer.parseInt(_score);
        test = _test;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 89 * hash + (this.teacher != null ? this.teacher.hashCode() : 0);
        hash = 89 * hash + (this.group != null ? this.group.hashCode() : 0);
        hash = 89 * hash + (this.test != null ? this.test.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final TestsTaken other = (TestsTaken) obj;
        if (this.teacher == null || !this.teacher.equals(other.teacher)) {
            return false;
        }
        if (this.group == null || !this.group.equals(other.group)) {
            return false;
        }
        if (this.test == null || !this.test.equals(other.test)) {
            return false;
        }
        return true;
    }
}
